package cn.sofwin.sb.dao.impl;

import cn.sofwin.sb.dao.UserDao;
import cn.sofwin.sb.entity.User;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository("userDao")  //添加注解是为了让其被IOC容器管理
public class UserDaoImpl implements UserDao<User> {

    @Override
    public int insert(User entity) {

        return 0;
    }

    @Override
    public int delete(Integer id) {
        return 0;
    }

    @Override
    public int update(User entity) {
        return 0;
    }

    @Override
    public User selectById(Integer id) {
        User user=new User();
        user.setId(id);
        user.setUsername("test");
        user.setPassword("8888");
        user.setNickname("测试账号");
        return user;
    }

    @Override
    public List<User> list(String query, String sort, Integer offset, Integer size) {
        return null;
    }

    @Override
    public int count(String query) {
        return 0;
    }
}
